<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:set var="ctx" value="${pageContext.request.contextPath}" />

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>重置密码</title>
<link href="${ctx }/css/style.css" rel="stylesheet" type="text/css" />
<link href="${ctx }/js/layui/css/layui.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="${ctx }/js/niceValidator/jquery.validator.css" />
<script type="text/javascript" src="${ctx }/js/jquery/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="${ctx }/js/layer/layer.js"></script>
<script type="text/javascript" src="${ctx }/js/niceValidator/jquery.validator.js"></script>
<script type="text/javascript" src="${ctx }/js/niceValidator/local/zh_CN.js"></script>
<script type="text/javascript" src="${ctx }/js/common.js"></script>

<script>
	$(document).ready(function(){
		$("#submitBtn").click(function(){
			submitForms();
		});
	});
	var index = parent.layer.getFrameIndex(window.name);
	//添加用户
	function submitForms(){
		$("#submitForm").trigger("validate");
		instance = $("#submitForm").data("validator");
		if(instance.isFormValid()){
			var loadi = layer.load();
			var datajson=$("#submitForm").serialize();
			$.ajax({
				type:"POST",
				url:"${ctx}/sysman/systemAdmin/resetPwd.do",
				data:datajson,
				dataType:"json",
				success:function(data){
					layer.close(loadi);
					if(data.status=='SUCCESS'){
						window.parent.baseSearchQuery('Refresh');
						window.parent.baseBottomMsgOpen('修改成功');
						window.parent.layer.close(index);
					}else{
						layer.alert(data.msg);
					}
				}
			});
		}
	}
</script>
</head>
<body style="min-width:600px;">
<div class="listNavTitle">
  <p>
    <label>系统管理 ></label>
    <label>用户管理</label>
  </p>
</div>
<div class="formbody">
  <div class="formtitle"><span>重置用户【${admin.systemUserName}】密码</span></div>
<form id="submitForm">
  <input type="hidden" name="systemCode" value="${admin.systemCode }"/>
  <ul class="forminfo">
    <li>
      <label>请输入密码</label>
      <input name="systemPwd" style="width:200px;" type="password" class="dfinput" data-rule="密码:required;password;"/>
    </li>
    <li>
      <label>&nbsp;</label>
      <button class="layui-btn layui-btn-normal" type="button" class="btn" id="submitBtn">确认保存</button>
    </li>
  </ul>
</form>
</div>
</body>
</html>

